<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>{% load i18n %}
    <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
    <meta http-equiv="Content-Language" content="en-us" />
    <title> Tip-Todo | {% block title %}The App for todo list{% endblock %}
    </title>
    <meta name="ROBOTS" content="ALL" />
    <meta http-equiv="imagetoolbar" content="no" />
    <meta name="MSSmartTagsPreventParsing" content="true" />
    <meta name="Copyright" content="Free to use." />
    <meta name="keywords" content="Python, Django, todo, open-source" />
    <meta name="description" content="Tip-todo is a open-source django app" />
    <link href="/css/base.css" rel="stylesheet" type="text/css" media="screen" />
    <link href="/css/common.css" rel="stylesheet" type="text/css" />
    <link href="/css/print.css" rel="stylesheet" type="text/css" media="print" />
    {% block extrahead %}{% endblock %}
  </head>
  <body id="{% block sectionid %}generic{% endblock %}" class="{% block coltype %}default{% endblock %}">
    <div id="container">
      <div id="header">
        <h1>
          <a href="/" title="Tip-Todo">Tip-Todo</a></h1>
        <div id="brdmenu" class="inbox">
          <ul>
            <li id="navindex">
              <a href="/">{%trans 'Index' %}</a></li>
            <li id="navuserlist">
              <a href="/mytips/">My tips</a></li>
              <li id="navdo">
              <a href="/add/">Write tip</a></li>
            <li id="navsearch">
              <a href="/accounts/profile">Setting</a></li>
            <li id="navabout">
              <a href="/about">about</a></li>
            <li id="navregister">
              <a href="/accounts/register">Register</a></li>
            <li id="navlogin">
              <a href="/accounts/login">Login</a></li>
          </ul>
        </div>
        {% if user.is_authenticated %}
         <p>Welcome, {{ user.username }}. Thanks for logging in.</p>
         {% else %}
            <p>Welcome, new user. Please log in.</p>
          {% endif %}
      </div> 
      <!-- END Header -->
      <div id="content-base">
      <div id="billboard"> {% block billboard %}{% endblock %}
      </div>
      <div id="columnwrap"> {% block columnwrap %}
        <div id="content-main"> {% block content %}{% endblock %}
        </div>
        <!-- END #content-main --> {% endblock %}
      </div>
      </div>
      <!-- END #content -->
      <div id="footer">
        <p>
          &copy; 2007 
          <a href="/">Tip-todo</a> Write by chyni.
        </p>
      </div>
    </div>
    <!-- END #container -->
  </body>
  
{% if debug %}
<div id="debug">
  <h2>Queries</h2>
  <p>
    {{ sql_queries|length }} Queries
    {% ifnotequal sql_queries|length 0 %}
    (<span style="cursor: pointer;" onclick="document.getElementById('debugQueryTable').style.display='';">Show</span>)
    {% endifnotequal %}
  </p>
  <table id="debugQueryTable" style="display: none;">
    <col width="1"></col>
    <col></col>
    <col width="1"></col>
    <thead>
    <tr>
      <th scope="col">#</th>
      <th scope="col">SQL</th>
      <th scope="col">Time</th>
    </tr>
    </thead>
    <tbody>
    {% for query in sql_queries %}<tr class="{% cycle odd,even %}">
      <td>{{ forloop.counter }}</td>
      <td>{{ query.sql|escape }}</td>
      <td>{{ query.time }}</td>
    </tr>{% endfor %}
    </tbody>
  </table>
</div>
{% endif %}

</html>
